chore(web): React UI v2.0 — Phase 8 (ESLint + size budget + CI + air-gap packaging + docs)#36
Merged
Conversation
3 tasks
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
bf20833 to
0f19207
Compare
- web/eslint.config.js: flat config with js.configs.recommended + typescript-eslint recommended + react-hooks + react-refresh rules. Ignores dist/, node_modules/, coverage/, playwright-report/, test-results/. Tests relax react-refresh + no-explicit-any. - Devdeps: @eslint/js@^9, typescript-eslint@^8, eslint-plugin-react-hooks@^5, eslint-plugin-react-refresh@^0.4, globals@^15. Verified: npm run lint → 0 errors, 2 warnings (react-refresh hints on selectedRef.tsx export shape — accepted as v2 known limitation).
- web/scripts/check-size.mjs: reads dist/assets/index-*.js, fails with exit 1 if raw > 400 kB or gzip > 130 kB. Uses node:zlib — no new deps. - web/package.json: 'check:size' script. Current: 309 kB raw / 94 kB gzip (well under budget).
- .github/workflows/web.yml: runs lint, typecheck, vitest+coverage, vite build, check:size. Triggers on pushes/PRs touching web/** or the workflow file. Uploads web/dist artifact on PR builds. - Working dir scoped to web/ via defaults.run. YAML parse OK; commands match local 'npm run' verbs.
- .github/workflows/web-e2e.yml: builds SPA, boots uvicorn backend (which serves both /api/v1 and the React SPA via Phase 0 StaticFiles mount), then runs Playwright at E2E_BASE_URL=http://localhost:8000. Uploads playwright-report + test-results + uvicorn.log on failure. - Triggers on PRs touching web/**, src/runtime/**, or the workflow. Ready to be exercised once the E2E specs land (Tasks 55, 56).
- scripts/package_airgap.py: composes dist/airgap/ with: - app.py <- dist/apps/incident-management.py - ui.py <- dist/ui.py - web/ <- web/dist/ (built React SPA) - README.txt with run instructions --allow-partial mode emits whatever inputs exist; default fails fast when a piece is missing. - .gitignore: dist/airgap/ (local artifact, never committed). Task 67 verified pre-existing: src/runtime/api_static.py exposes mount_static_assets which is already called in build_app at L1034. ASR_WEB_DIST env var or web/dist default. 4/4 tests pass in tests/test_api_static_serve.py.
- docs/RELEASE.md: step-by-step for cutting a release candidate — verify package.json version, regen dist/ bundles, build SPA, run package_airgap.py, sanity gates, then git tag on main. - .gitignore: allowlist docs/RELEASE.md and docs/REACT_UI_PARITY.md (Task 71). package.json version is already 2.0.0-rc1. The actual `git tag` lives in Task 21 (final ship + verify) once all PRs merge to main.
- README.md: quickstart now leads with `uvicorn runtime.api:get_app` (backend that also serves the SPA) + `cd web && npm run dev` for the Vite dev path. Streamlit demoted to "legacy / deprecated". Status block calls out v2.0.0-rc1 and points to RELEASE.md + REACT_UI_PARITY.md. - docs/AIRGAP_INSTALL.md: new "v2.0 — React UI in the air-gap payload" section. Describes the build + package_airgap.py flow, the dist/airgap/ layout, and ASR_WEB_DIST env var resolution.
6a0cc3e to
a218c83
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 8 of v2.0-rc1. Ships the build / deploy / CI story:
@eslint/js,typescript-eslint,react-hooks,react-refresh).npm run lint→ 0 errors.scripts/check-size.mjs+npm run check:size. Budget: 400 kB raw / 130 kB gzip. Current: 309 kB / 94 kB..github/workflows/web.yml: lint / typecheck / unit+coverage / build / size on PRs touchingweb/**..github/workflows/web-e2e.yml: boots backend (uvicorn) + builds SPA + runs Playwright on PRs touchingweb/**orsrc/runtime/**. Uploads playwright-report + uvicorn.log on failure.scripts/package_airgap.pycomposesdist/airgap/{app.py, ui.py, web/, README.txt}. Pre-existingruntime/api_static.mount_static_assetsalready serves the SPA viaASR_WEB_DISTorweb/distdefault.docs/RELEASE.mddocuments the v2.0.0-rc1 release procedure.docs/AIRGAP_INSTALL.mdupdated for the React UI quickstart + air-gap layout.Stacked PRs
Based on #35 (Phase 7). After #35 merges, this PR will retarget to
main.Verification
npm run lint— 0 errors / 2 warningsnpm run check:size— ✓ within budgetcd web && npm run build && cd .. && uv run python scripts/package_airgap.py→dist/airgap/ready for copy-only deploy.Test plan
.github/workflows/web.ymlruns green on this PR.github/workflows/web-e2e.ymlruns green on this PR (E2E specs from feat(web): React UI v2.0 — Phases 0-6 (backend + scaffold + shell + canvas + monitors + modals) #34)package_airgap.py --out /tmp/airgap-testlands a working bundle🤖 Generated with Claude Code